package com.xiaoyu.controller;


import com.xiaoyu.entity.Goods;
import com.xiaoyu.service.impl.GoodsServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping
public class testController {
    @Autowired
    private GoodsServiceImpl goodsService;

    @GetMapping("/test")
    public List<Goods> test() {
        List<Goods> list = goodsService.list();
        return list;
    }

    @GetMapping("/test1")
    public List<Goods> test1() {
        List<Goods> list = goodsService.listA();
        return list;
    }
}
